package org.example.builder;

/**
 * @author Zhang Yu
 * @description: 指挥者对象
 * @date 2024/5/20 13:45
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Product construct() {
        builder.buildPart1();
        builder.buildPart2();
        builder.buildPart3();
        Product product = builder.getProduct();
        return product;
    }

}
